folder = r'/Users/xyh/Desktop'
import os
import cv2
for i in range(1,7):

    if i in [1,2]:
        full = os.path.join(folder,'{}.jpeg'.format(i))
    else:
        full = os.path.join(folder, '{}.jpg'.format(i))
    if os.path.exists(full) == False:
        print(full,'x')
    img= cv2.imread(full)
    rows = img.shape[0]
    top = int((rows - 1390)/2)
    img = img[top:top+1390,:,:]
    print(img.shape)
    #print(img)
    # cv2.imshow('show',img)
    # cv2.waitKey()
    cv2.imwrite('input/{}.png'.format(i),img)
import video_util
t={
    1:4,
    2:10,
    3:6,
    4:8,
    5:4,
    6:4,
}
imgs = ['input/{}.png'.format(i) for  i in range(1,7) for j in range(t[i])]
video_util.make_mp4(imgs,'smaple_intro.mp4',['特别新品','秋日限定乌梅子','日系圆框推荐','粉嫩少女心','温柔新品','日系小圆框'],fps=4,size=(1080,1390))
